<template>
	<view class="team">
		<view class="" style="text-align: center;display: flex;justify-content: space-between;padding:10rpx 40rpx;">
			<view class="" style="">
				<view class="" style="color: red;font-weight:bold;line-height:40rpx;">2</view>
				<image src="../static/images/hg3.png" mode="" style="width: 95rpx;height: 65rpx;"></image>
				<view class="avator"><image :src="lis[1].avator" mode="" ></image></view>
				<view class="" style="color: #FFF9FC;line-height: 30rpx;">{{Number(lis[1].commission) >= "10000"? (lis[1].commission/1000).toFixed(2)+"千" : lis[1].commission}}</view>
			</view>
			<view class="">
				<image src="../static/images/hg2.png" mode="" style="width: 110rpx;height: 80rpx;"></image>
				<view class="avator1"><image :src="lis[0].avator" mode=""></image></view>
				<view class="" style="color: #FFF9FC;line-height: 30rpx;">{{Number(lis[0].commission) >= "10000"? (lis[0].commission/1000).toFixed(2)+"千" : lis[0].commission}}</view>
			</view>
			
			<view class="">
				<view class="" style="color: red;font-weight:bold;line-height:40rpx;">3</view>
				<image src="../static/images/hg1.png" mode="" style="width: 95rpx;height: 65rpx;"></image>
				<view class="avator"><image :src="lis[2].avator" mode=""></image></view>
				<view class="" style="color: #FFF9FC;line-height: 30rpx;">
				{{Number(lis[2].commission) >= "10000"? (lis[2].commission/1000).toFixed(2)+"千" : lis[2].commission}}</view>
			</view>
		</view>
		
		 
		<view class="ListBox" style="padding: 20rpx;background-color: #FFFFFF;margin: 20rpx 30rpx;border-radius: 20rpx;">
			<view v-for="(item,index) in lis" :key="index" class="List">
				<view v-if="index>2" class="flex" style="margin: 20rpx 0;">
					<view class="flex" style="font-size: 30rpx;font-weight: bold;">{{index+1}}</view>
					<view class="flex Info" style="width: 600rpx;">
						<view class="">
							<image style="width: 110upx;height: 110upx;margin-right: 20rpx;" :src="item.avator" mode=""></image>
						</view>
						<view class="" style="width: 340rpx;">
							<view class="">
								{{item.member_name}}
							</view>
							<view class="">
								推荐人：{{item.parent_name}}
							</view>
							<view class="">
								成功消费：{{item.buy_count}}次
							</view>
						</view>
						<view class="flex" style="width: 150rpx;color: #ffcd2e;font-size: 32rpx;">
							{{Number(item.commission) >= "10000"? (item.commission/1000).toFixed(2)+"千" : item.commission}}
						</view>
					</view>
				</view>
			</view>	
		</view>
		
		
		<!-- <view v-for="(item,index) in lis" :key="index" class="commonLi">
			<view style="width: 110upx;" class="">
				<image style="width: 110upx;height: 110upx;" :src="item.avator" mode=""></image>
			</view>
			<view style="padding-left: 20upx;" class="">
				<view class="c999 fs18 lh40">
					<text class="fs22">{{item.member_name}}</text> 
				</view>
				<view class="c999 fs18">
					推荐人：{{item.parent_name}}
				</view>
				<view class="c999 fs18">
					成功消费：{{item.buy_count}}次
				</view>
				<view class="c999 fs18">
					累计佣金：{{item.commission}}
				</view>
			</view>
		</view>
		 -->
		<view style="margin-bottom: 200upx;" v-if="lis.length<=0">
			<image style="width: 100%" :src="`${picUrl}/InfoNull.png`" mode="widthFix"></image>
		</view>
			
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				lis:[0,1,2,3,4],
				active1:0,
				active2flag:2,
				
			}
		},
		onShow() {
			
		},
		onLoad() {
			this.getLis()
			// uni.setNavigationBarColor({
			// 	backgroundColor:"#fe9003"
			// })
		},
		methods: {
			getLis(){
				this.$util.request({
					url: '/mobile/index.php?act=distribution&op=rich_list',
					method: 'get',
					data: {
				
					},
				}).then((res)=> {						
					this.lis=res.datas.list
				})
			},
			tab2(index,url){
				this.active2flag=index				
				uni.switchTab({
					url:url
				})
			}			
		}
	}
</script>

<style>	
	.status_bar {
	    height: var(--status-bar-height);  
	    width: 100%;  
	    background-color: #fca2a2;
	}  
	.top_view {  
	    height: var(--status-bar-height);  
	    width: 100%;  
	    position: fixed;  
	    background-color: #fca2a2;  
	    top: 0;  
	    z-index: 999;  
	}
	.lh20{
		line-height: 20upx;
		height: 20upx;
	}
	.lh25{
		line-height: 25upx;
	}
	.lh30{
		line-height: 30upx;
	}
	.lh35{
		line-height: 35upx;
	}
	.lh40{
		line-height: 40upx;
	}
	.lh45{
		line-height: 45upx;
	}
	.lh50{
		line-height: 50upx;
	}
	.lh100{
		line-height: 100upx;
	}
	.C000{
		color: #000000;
	}
	.Ce13d97{
		color: #ff4300;
	}
	.Cfe0000{
		color: #ff4300;
	}
	.Cc06{
		color: #ff4300;
	}
	.mt55mb30{
		margin-top: 55upx;
		margin-bottom: 30upx;
	}
	.Cfff{
		color: #FFFFFF;
	}

	.flex{		
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		align-content: space-between;
		align-items: center;
	}
	.paddingL20{
		padding-left: 20upx;
	}
	.C999{
		color:#999 ;
	}
	.Cff0101{
		color:#ff0101 ;
	}
	.Cc00251{
		color: #c00251;
	}
	.strick{
		text-decoration: line-through;
	}
	.Cfe0000{
		color: #ff4300;
	}
	.line1{
		width: 430upx;
	}
	.hide{
		display: none;
	}
	.marginB20{
		margin-bottom: 20upx;
	}
	
	.twoline{
	   overflow : hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}
	.pl20{
		padding-left: 20upx;
	}
	.positionT{
		position: relative;
		top: 50upx;
	}
	.paddingB15{
		padding-bottom: 15upx;
	}
	.borderB{
		border-bottom: 1px solid #f4f4f6;
	}
	.borderT{
		border-top: 1px solid #f4f4f6;
	}
	.gl{
		position: absolute;
		right: 30upx;
	}
	.pr30{
		padding-right: 30upx;
	}
	.C333{
		color: #333333;
	}
	.C666{
		color: #666666;
	}
	.Cf00{
		color: #ff0000;
	}
	
	.bold{
		font-weight: bold;
	}
	.C1d1d1d{
		color:#1d1d1d ;
	}
	.fl{
		float: left;
	}
	.fr{
		float: right;
	}
	.tac{
		text-align: center;
	}
	.Ce5258e{
		color: #e5258e;
	}
	.Cccc{
		color: #CCCCCC;
	}
	page{
		background-color: #fe9402 !important;
	}		
	.fs30{
		/* font-size: 30upx */
		font-size: 45upx
	}
	.fs26{
		font-size:39upx
		/* font-size: 26upx */
	}
	.fs12{
		font-size: 18upx
		/* font-size: 12upx */
	}
	.fs16{
		font-size: 24upx
		/* font-size: 16upx */
	}
	.fs14{
		font-size: 21upx
		/* font-size: 14upx */
	}
	.fs15{
		font-size: 22.5upx
		/* font-size: 15upx */
	}
	.fs27{
		font-size: 40.5upx
		/* font-size: 27upx */
	}
	.fs18{
		font-size: 27upx
		/* font-size: 18upx */
	}
	.fs28{
		font-size: 42upx
		/* font-size: 28upx */
	}
	.fs10{
		font-size: 15upx
		/* font-size: 10upx */
	}
	.fs30{
		font-size: 45upx
		/* font-size: 28upx */
	}
	.fs24{
		font-size: 36upx
		/* font-size: 24upx */
	}
	.fs20{
		font-size:30upx
		/* font-size: 20upx */
	}
	.fs22{
		font-size:33upx
		/* font-size: 22upx */
	}
	.fs21{
		font-size: 31.5upx
		/* font-size: 21upx */
	}
	
	.bottom{
		box-sizing: border-box;
		padding: 0 10upx;
		background-color: #FFFFFF;
		position: fixed;
		z-index: 99999999999;
		left: 0;
		bottom: 0;
		height: 98upx;
		width: 100%;
		box-shadow: 0upx -1upx 10upx rgba(0,0,0,0.8);
		display: flex;
		flex-direction: row;
		justify-content: space-around;
	}
	.bottom view{
		font-size: 27upx;
		color: #666;
		text-align: center;
	}
	.bottom view.active2{
		color: #ff4300;
	}
	.bottom image{
		position: relative;
		top: 15upx;
		width: 33upx;
		height: 33upx;
	}
	.title2{
		margin-top: 76upx;
		margin-bottom: 0upx;
		height: 35px;
		padding-left: 20upx
	}
	.oneLine{
		text-overflow: ellipsis;
		overflow: hidden;
		white-space: nowrap;
	}
	.Ce5007e{
		color: #e5007e;
	}
	.team{
		background-color: #fe9003;		
	}
	.active1{
		color: #ff4300;
	}
	.commonLi{
		margin-top:25upx;
		padding:38upx ;
		box-sizing: border-box;
		background-color: #FFFFFF;
		display: flex;		
	}
	.avator image{
		width: 120rpx;height: 120rpx;border-radius: 50%;margin-top: -30rpx;border: 4rpx solid #20c7e6;
	}
	.avator1 image{
		width: 150rpx;height: 150rpx;border-radius: 50%;margin-top: -30rpx;border: 4rpx solid #ffd821;
	}
	.Info{
		border-bottom: 1rpx solid #EEEEEE; 
		text-align: left;
	}
	.List{
		line-height: 30rpx;
	}
</style>
